package com.blb.community.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;


/**
 * <p>
 * 单元 
 * </p>
 *
 * @author 帅帅
 * @since 2022-07-02
 */
@TableName("zy_unit")
@ApiModel(value = "ZyUnit对象", description = "单元 ")
public class
ZyUnit implements Serializable {

    private static final long serialVersionUID = 1L;
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("单元id")
    @TableId(value = "unit_id",type = IdType.ASSIGN_ID)
    private Long unitId;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("小区id")
    private Long communityId;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("楼栋id")
    private Long buildingId;

    @ApiModelProperty("单元名称")
    private String unitName;

    @ApiModelProperty("单元编号")
    private String unitCode;

    @ApiModelProperty("层数")
    private Integer unitLevel;

    @ApiModelProperty("建筑面积")
    private BigDecimal unitAcreage;

    @ApiModelProperty("是否有电梯")
    private String unitHaveElevator;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("创建者")
    private String createBy;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("创建时间")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty("更新者")
    private String updateBy;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;

    @ApiModelProperty("备注")
    private String remark;

    public Long getUnitId() {
        return unitId;
    }

    public void setUnitId(Long unitId) {
        this.unitId = unitId;
    }
    public Long getCommunityId() {
        return communityId;
    }

    public void setCommunityId(Long communityId) {
        this.communityId = communityId;
    }
    public Long getBuildingId() {
        return buildingId;
    }

    public void setBuildingId(Long buildingId) {
        this.buildingId = buildingId;
    }
    public String getUnitName() {
        return unitName;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }
    public String getUnitCode() {
        return unitCode;
    }

    public void setUnitCode(String unitCode) {
        this.unitCode = unitCode;
    }
    public Integer getUnitLevel() {
        return unitLevel;
    }

    public void setUnitLevel(Integer unitLevel) {
        this.unitLevel = unitLevel;
    }
    public BigDecimal getUnitAcreage() {
        return unitAcreage;
    }

    public void setUnitAcreage(BigDecimal unitAcreage) {
        this.unitAcreage = unitAcreage;
    }
    public String getUnitHaveElevator() {
        return unitHaveElevator;
    }

    public void setUnitHaveElevator(String unitHaveElevator) {
        this.unitHaveElevator = unitHaveElevator;
    }
    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }
    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }
    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }
    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public String toString() {
        return "ZyUnit{" +
            "unitId=" + unitId +
            ", communityId=" + communityId +
            ", buildingId=" + buildingId +
            ", unitName=" + unitName +
            ", unitCode=" + unitCode +
            ", unitLevel=" + unitLevel +
            ", unitAcreage=" + unitAcreage +
            ", unitHaveElevator=" + unitHaveElevator +
            ", createBy=" + createBy +
            ", createTime=" + createTime +
            ", updateBy=" + updateBy +
            ", updateTime=" + updateTime +
            ", remark=" + remark +
        "}";
    }
}
